package com.smartstate.dataManagement.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


import javax.persistence.Transient;
import java.util.Date;


@Data
@ApiModel(description = "用户表")
@TableName("user")
public class User  {

    /**
     * 主键ID
     */
    @TableId(type = IdType.INPUT)
    @TableField(value = "ID", fill = FieldFill.INSERT)
    private String id;


    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    @TableField(value = "USERNAME")
    private String userName;

    /**
     * 用户昵称
     */
    @ApiModelProperty(value = "用户昵称")
    @TableField(value = "NICKNAME")
    private String nickname;

    /**
     * 用户账户密码
     */
    @ApiModelProperty(value = "用户账户密码")
    @TableField(value = "PASSWORD")
    private String password;

    /**
     * 年龄
     */
    @ApiModelProperty(value = "年龄")
    @TableField(value = "AGE")
    private Integer age;

    /**
     * 用户性别  1,男   2,女
     */
    @ApiModelProperty(value = "用户性别")
    @TableField(value = "SEX")
    private Integer sex;


    /**
     * 年龄
     */
    @ApiModelProperty(value = "年龄")
    @TableField(value = "BIRTHDAY")
    private Date birthday;

    /**
     * 手机号码
     */
    @ApiModelProperty(value = "手机号码")
    @TableField(value = "PHONE")
    private String phone;

    /**
     * EMAIL
     */
    @ApiModelProperty(value = "EMAIL")
    @TableField(value = "EMAIL")
    private String email;

    /**
     * 省
     */
    @ApiModelProperty(value = "省")
    @TableField(value = "PROVINCE")
    private String province;

    /**
     * 市
     */
    @ApiModelProperty(value = "市")
    @TableField(value = "CITY")
    private String city;

    /**
     * 区
     */
    @ApiModelProperty(value = "区")
    @TableField(value = "AREA")
    private String area;

    /**
     * 住址
     */
    @ApiModelProperty(value = "住址")
    @TableField(value = "ADDRESS")
    private String address;

    /**
     * 用户类型 1:后台用户 0:前台用户
     */
    @ApiModelProperty(value = "用户类型")
    @TableField(value = "USER_TYPE")
    private Integer userType;

    /**
     * 后台用户头像
     */
    @ApiModelProperty(value = "后台用户头像")
    @TableField(value = "HEAD_IMAGE")
    private String headImage;

    /**
     * 部门ID
     */
    @ApiModelProperty(value = "部门ID")
    @TableField(value = "DEPT_ID")
    private String deptId;

    /**
     * 公司ID
     */
    @ApiModelProperty(value = "公司ID")
    @TableField(value = "enterprise_id")
    private String enterpriseId;

    /**
     * 最后登录ip
     */
    @ApiModelProperty(value = "最后登录ip")
    @TableField(value = "LAST_LOGIN_IP")
    private String lastLoginIp;

    /**
     * 最后登录时间
     */
    @ApiModelProperty(value = "最后登录时间")
    @TableField(value = "LAST_LOGIN_TIME")
    private Date lastLoginTime;

    /**
     * 是否删除
     */
    @ApiModelProperty(value = "是否删除")
    @TableField(value = "IS_DELETED")
    private Integer isDeleted;

//    /**
//     * 是否有效
//     */
//    @ApiModelProperty(value = "是否有效")
//    @TableField(value = "STATU")
//    private String  status;

        /**
     * 是否有效
     */
    @ApiModelProperty(value = "是否有效( 1 是有效， 0 是 无效 ）  ")
    @TableField(value = "state")
    private String  state;

    /**
     * 是否超级管理员
     */
    @ApiModelProperty(value = "是否超级管理员")
    @TableField(value = "IS_ADMIN")
    private Integer isAdmin;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;


    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private String createUser;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    @TableField(value = "UPDATE_USER", fill = FieldFill.UPDATE)
    private String updateUser;


    @Transient
    @TableField(exist = false)
    private String code;

    @Transient
    @TableField(exist = false)
    private String randomStr;


}
